import socket

def start_client(server_ip, port=65432):
    with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as s:
        s.connect((server_ip, port))
        while True:
            prompt = s.recv(1024).decode()
            cmd = input(prompt)
            if cmd.lower() == 'exit':
                break
            s.sendall(cmd.encode())
            data = s.recv(4096).decode()
            if data:
                print(data)

if __name__ == "__main__":
    print("***本产品仅供渗透测试等合法用途使用 用于非法用途与原作者无关***")
    server_ip = input("IP: ")
    start_client(server_ip)
